﻿#ifndef MULTILISTPUSHBUTTON_H
#define MULTILISTPUSHBUTTON_H

#include <QPushButton>
#include <QMenu>

class MultiListPushButton : public QPushButton
{
    Q_OBJECT
public:
    explicit MultiListPushButton(QWidget *parent = nullptr);

    void setCurrentMenuIndex(int currentMenuIndex);

    void addMenuItemsLabel(QStringList labels);

    int getMenuSize(int index);

    void setCheckedState(QList<QList<bool>> checkedStateList);

    int getCurrentMenuIndex();
signals:
    void menuItemClicked(int index, bool checked);

public slots:
    void showMenu();

private:
    QList<QMenu*> menus;
    QList<QList<QAction*>> menuActions;

    int currentMenuIndex;
};

#endif // MULTILISTPUSHBUTTON_H
